package com.wn.ziroom.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wn.ziroom.entity.Streets;
import com.wn.ziroom.mapper.StreetsMapper;
import com.wn.ziroom.service.StreetsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-23 02:27:54
 */
@Service
public class StreetsServiceImpl extends ServiceImpl<StreetsMapper, Streets> implements StreetsService {

    private StreetsMapper streetsMapper;

    @Autowired
    public void setStreetsMapper(StreetsMapper streetsMapper) {
        this.streetsMapper = streetsMapper;
    }

    @Override
    public List<Streets> findListByAreaCode(Integer areaCode) {
        QueryWrapper<Streets> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("areaCode",areaCode);
        return streetsMapper.selectList(queryWrapper);
    }
}
